<?php
    class admin_controller_login extends controller
    {
        public $member;

        function run()
        {
            $name     = c('name');
            $password = c('password');

            if ($name != '' && $password != '')
            {
            	$this->member = new admin_model_member();
                $res = $this->member->validate($name, $password);

                if ($res)
                {
                    $administrator_information = $this->member->through_username_get_information($name);
                    $_SESSION['administrator_information'] = $administrator_information;

                    jump('admin.html');
                }
            }
        }
    }